package com.starmark.sys.login.provider.service;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 验证码服务
 * @author starmark
 * @date 2020/5/30  下午9:45
 */
public interface ICaptchaService {

    /**
     * 创建验证码
     * @param id 页面ID
     * @param httpServletResponse 响应
     * @return 验证码数据
     */
    void createCaptcha(String id, HttpServletResponse httpServletResponse) throws IOException;

    /**
     * 验证验证码
     * @param id 验证码
     * @param rightCode 输入的验证码
     * @return 检查结果
     */
     int    checkCaptcha(  String id,   String rightCode);
}
